package com.xgp.company.结构性模式.代理模式.静态代理.Demo1;

public class Proxy implements Rent {

    private Host host;

    public Proxy() {

    }

    public Proxy(Host host) {
        this.host = host;
    }

    @Override
    public void rent() {
        seeHouse();
        host.rent();
        fare();
        hetong();
    }

    //看房
    public void seeHouse() {
        System.out.println("中介代理看房");
    }

    //收中介费
    public void fare() {
        System.out.println("收中介费");
    }

    public void hetong() {
        System.out.println("签合同");
    }
}
